package com.liit.controller.func;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.liit.controller.index.BaseController;
import com.liit.util.RegionUtils;

/**
 * 
 * @author dingweibo
 * @Title: LogController.java
 * @Description: 区域信息
 * @date 2016年3月28日
 */
@Controller
@RequestMapping("/region/")
public class RegionController extends BaseController {

	/**
	 * 查询所有省信息
	 * 
	 * @return
	 * @throws Exception
	 */
	@ResponseBody
	@RequestMapping("findProvince")
	public Object findProvince() throws Exception {
		return RegionUtils.getProvinceList();
	}

	@ResponseBody
	@RequestMapping("findRegionByParentId")
	public Object findRegionByParentId(Integer parentId) throws Exception {
		return RegionUtils.getRegionByParentId(parentId);
	}

	@ResponseBody
	@RequestMapping("findRegionById")
	public Object findRegionById(Integer id) throws Exception {
		return RegionUtils.getRegionById(id);
	}
}